package com.canomo.modules.inventory.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;

/**
 * <p>
 * 产品明细
 * </p>
 *
 * @author xiaoj
 * @since 2018-07-17
 */
@TableName("inv_product_detail")
public class ProductDetail extends Model<ProductDetail> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER)
    @JsonSerialize(using=ToStringSerializer.class)
    private Long id;

    /**
     * 产品ID
     */
    @TableField("product_id")
    private Long productId;

    /**
     * 长
     */
    private String length;

    /**
     * 宽
     */
    private String width;

    /**
     * 高
     */
    private String height;

    /**
     * 颜色
     */
    private String color;

    /**
     * 体积重
     */
    @TableField("volume_weight")
    private String volumeWeight;

    /**
     * 参考链接
     */
    @TableField("consult_link")
    private String consultLink;

    /**
     * 采购链接
     */
    @TableField("purchase_link")
    private String purchaseLink;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }
    public String getLength() {
        return length;
    }

    public void setLength(String length) {
        this.length = length;
    }
    public String getWidth() {
        return width;
    }

    public void setWidth(String width) {
        this.width = width;
    }
    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }
    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
    public String getVolumeWeight() {
        return volumeWeight;
    }

    public void setVolumeWeight(String volumeWeight) {
        this.volumeWeight = volumeWeight;
    }
    public String getConsultLink() {
        return consultLink;
    }

    public void setConsultLink(String consultLink) {
        this.consultLink = consultLink;
    }
    public String getPurchaseLink() {
        return purchaseLink;
    }

    public void setPurchaseLink(String purchaseLink) {
        this.purchaseLink = purchaseLink;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ProductDetail{" +
        "id=" + id +
        ", productId=" + productId +
        ", length=" + length +
        ", width=" + width +
        ", height=" + height +
        ", color=" + color +
        ", volumeWeight=" + volumeWeight +
        ", consultLink=" + consultLink +
        ", purchaseLink=" + purchaseLink +
        "}";
    }
}
